package controller;


import java.awt.Color;
import java.awt.Dimension;

import javax.swing.ImageIcon;

import controller.ActionEvents.ActionHandler;

import view.MainFrame;
import view.OptionPanes;
import view.admin.AdminCreateUser;
import view.admin.AdminDeleteUser;
import view.admin.AdminEditUser;
import view.admin.AdminLogin;
import view.admin.AdminMenu;
import view.admin.AdminStatistics;
import view.user.Balance;
import view.user.CreateAccount;
import view.user.Deposit;
import view.user.Leaderboard;
import view.user.Login;
import view.user.Menu;
import view.user.Settings;
import view.user.Statistics;
import view.user.Transfer;
import view.user.Withdrawal;

public class SkinChanger{



	private MainFrame frame;
	private int currentSkin = 1;
	private ImageIcon imageIconSubmit= new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/submit.png"));
	private ImageIcon imageIconSubmitGreen= new ImageIcon(SkinChanger.class.getResource("/Pictures/green/submit.png"));
	private ImageIcon imageIconSubmitMouseOverGreen= new ImageIcon(SkinChanger.class.getResource("/Pictures/green/submitMouseOver.png"));
	protected static ActionHandler singletonSkinChanger = null;
	
	private ImageIcon imageIconRadioButton = null;
	private ImageIcon imageIconRadioButtonSelected = null;
	
	private Settings settings;
	private Deposit deposit;
	private Withdrawal withdrawal;
	private Login login;
	private Transfer transfer;
	private Menu menu;
	private CreateAccount createAccount;
	
	private AdminCreateUser adminCreateUser;
	private AdminDeleteUser adminDeleteUser;
	private AdminEditUser adminEditUser;
	private AdminStatistics adminStatistics;
	private AdminLogin adminLogin;
	private AdminMenu adminMenu;

	private boolean UXIsEnabled = true;
	private boolean GreenIsEnabled = false;
	
	

	

	public SkinChanger(MainFrame frame) {
		this.frame = frame;
		currentSkin = new Integer(currentSkin);
		
		if(singletonSkinChanger == null)
		{
		currentSkin = 1;
		}
		
		
	}

	/**
	 * Method is invoked every time a class method is called.
	 */
	public void setObjects()
	{
		
		// User objects are initializes
		settings = frame.getCenterPanel().getAbout();
		deposit = frame.getCenterPanel().getDeposit();
		withdrawal = frame.getCenterPanel().getWithdrawal();
		login = frame.getLogin();
		transfer = frame.getCenterPanel().getTransfer();
		menu = frame.getMenu();
		createAccount = frame.getCenterPanel().getCreateAccount();
		
		// admin objects
		adminCreateUser = frame.getAdminPanel().getAdminCreateUser();
		adminDeleteUser = frame.getAdminPanel().getAdminDeleteUser();
		adminEditUser = frame.getAdminPanel().getAdminEditUser();
		adminStatistics = frame.getAdminPanel().getAdminStatistics();
		adminLogin = frame.getAdminPanel().getAdminLogin();
		adminMenu = frame.getAdminPanel().getAdminMenu();		
		
	}

	/**
	 * changes the users skin by calling JComponents and setting their bounds and icons.
	 * the 2 if-statements decides their states
	 */
	public void changeUserSkin()
	{
		
		setObjects();
		
		
		
		
		
		if(currentSkin == 1)
		{
			// singletonSkinChanger is reused
			if(singletonSkinChanger == null)
			{
				
				frame.getColorChanger().colorChange(Color.white);
				singletonSkinChanger = new ActionHandler(frame); //Singleton sets instance to not null

			}
		ImageIcon imageIconAbout = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/settings.png"));
		ImageIcon imageIconAboutClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/settingsClicked.png"));
		menu.getBtnAbout().setIcon(imageIconAbout);
		menu.getBtnAbout().setSelectedIcon(imageIconAboutClicked);
		menu.getBtnAbout().setBounds(488, 0, 89, 33);
		
		
		ImageIcon imageIconBalance = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/balance.png"));
		ImageIcon imageIconBalanceClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/balanceClicked.png"));
		menu.getBtnBalance().setIcon(imageIconBalance);
		menu.getBtnBalance().setSelectedIcon(imageIconBalanceClicked);
		menu.getBtnBalance().setBounds(0, 0, 89, 33);
		
		ImageIcon imageIconDeposit = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/deposit.png"));
		ImageIcon imageIconDepositClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/depositClicked.png"));
		menu.getBtnDeposit().setIcon(imageIconDeposit);
		menu.getBtnDeposit().setSelectedIcon(imageIconDepositClicked);
		menu.getBtnDeposit().setBounds(83, 0, 89, 33);
		
		ImageIcon imageIconWithdrawal = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/withdrawal.png"));
		ImageIcon imageIconWithdrawalClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/withdrawalClicked.png"));
		menu.getBtnWithdrawal().setIcon(imageIconWithdrawal);
		menu.getBtnWithdrawal().setSelectedIcon(imageIconWithdrawalClicked);
		menu.getBtnWithdrawal().setBounds(166, 0, 82, 33);
		
		ImageIcon imageIconCreateAccount = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/createAccount.png"));
		ImageIcon imageIconCreateAccountClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/createAccountClicked.png"));
		menu.getBtnCreateAccount().setIcon(imageIconCreateAccount);
		menu.getBtnCreateAccount().setSelectedIcon(imageIconCreateAccountClicked);
		menu.getBtnCreateAccount().setBounds(323, 0, 89, 33);
		
		ImageIcon imageIconLogOut = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/logout.png"));
		ImageIcon imageIconLogOutClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/logoutClicked.png"));

		menu.getBtnLogOut().setIcon(imageIconLogOut);
		menu.getBtnLogOut().setSelectedIcon(imageIconLogOutClicked);
		menu.getBtnLogOut().setBounds(661, 0, 89, 33);
		
		ImageIcon imageIconLeaderboard = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/leaderboard.png"));
		ImageIcon imageIconLeaderboardClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/leaderboardClicked.png"));

		menu.getBtnLeaderboard().setIcon(imageIconLeaderboard);
		menu.getBtnLeaderboard().setSelectedIcon(imageIconLeaderboardClicked);
		menu.getBtnLeaderboard().setBounds(574, 0, 89, 33);
		
		ImageIcon imageIconStatistics = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/statistics.png"));
		ImageIcon imageIconStatisticsClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/statisticsClicked.png"));
		menu.getBtnStatistics().setIcon(imageIconStatistics);
		menu.getBtnStatistics().setSelectedIcon(imageIconStatisticsClicked);
		menu.getBtnStatistics().setBounds(406, 0, 89, 33);
		
		ImageIcon imageIconTransfer = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/transfer.png"));
		ImageIcon imageIconTransferClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/transferClicked.png"));
		menu.getBtnTransfer().setIcon(imageIconTransfer);
		menu.getBtnTransfer().setSelectedIcon(imageIconTransferClicked);
		menu.getBtnTransfer().setSize(89, 33);
		menu.getBtnTransfer().setBounds(249, 0, 82, 33);
		
		

		deposit.getBtnSubmit().setIcon(imageIconSubmit);
		deposit.getBtnSubmit().setRolloverEnabled(false);
		deposit.getBtnSubmit().setBounds(245, 275, 130, 29);
	
		withdrawal.getBtnSubmit().setIcon(imageIconSubmit);
		withdrawal.getBtnSubmit().setRolloverEnabled(false);
		withdrawal.getBtnSubmit().setBounds(245, 275, 130, 29);
		
		transfer.getBtnSubmit().setIcon(imageIconSubmit);
		transfer.getBtnSubmit().setRolloverEnabled(false);
		transfer.getBtnSubmit().setBounds(305, 310, 130, 29);
		
		settings.getBtnSubmitPasswordChange().setIcon(imageIconSubmit);
		settings.getBtnSubmitPasswordChange().setRolloverEnabled(false);
		settings.getBtnSubmitPasswordChange().setBounds(305, 319, 130, 29);
		
		deposit.getBtnSubmitNewCategory().setIcon(imageIconSubmit);
		deposit.getBtnSubmitNewCategory().setSize(130, 29);
		deposit.getBtnSubmitNewCategory().setRolloverEnabled(false);
		
		withdrawal.getBtnSubmitNewCategory().setIcon(imageIconSubmit);
		withdrawal.getBtnSubmitNewCategory().setSize(130, 29);
		withdrawal.getBtnSubmitNewCategory().setRolloverEnabled(false);
		
		ImageIcon imageIconSearch = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/search.png"));
		transfer.getBtnSearch().setIcon(imageIconSearch);
		transfer.getBtnSearch().setRolloverEnabled(false);
		
		createAccount.getBtnSubmit().setIcon(imageIconSubmit);
		createAccount.getBtnSubmit().setRolloverEnabled(false);
		createAccount.getBtnSubmit().setSize(130, 29);
		
		
		ImageIcon imageIconSearchMouseOver = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/search.png"));
		transfer.getBtnSearch().setIcon(imageIconSearch);
		transfer.getBtnSearch().setBounds(498, 209, 48, 39);

		imageIconRadioButton = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/radioButton.png"));
		imageIconRadioButtonSelected = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/radioButtonSelected.png"));

		
//		menu.setPreferredSize(new Dimension(750, 34));
		
		
		
	
//		imageIconAdminStroke = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/adminStroke.png"));
//		adminPanel.getAdminMenu().getLblStroke().setIcon(imageIconAdminStroke);	
//		
		
		}
		
		else if(currentSkin == 2)
		{
//			frame.getColorChanger().colorChange(Color.decode("#1cdd49"));
			
			ImageIcon imageIconAbout = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/settings.png"));
			ImageIcon imageIconAboutClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/settingsClicked.png"));
			menu.getBtnAbout().setIcon(imageIconAbout);
			menu.getBtnAbout().setSelectedIcon(imageIconAboutClicked);
			menu.getBtnAbout().setBounds(488, 0, 89, 63);
			
			ImageIcon imageIconBalance = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/balance.png"));
			ImageIcon imageIconBalanceClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/balanceClicked.png"));
			menu.getBtnBalance().setIcon(imageIconBalance);
			menu.getBtnBalance().setSelectedIcon(imageIconBalanceClicked);
			menu.getBtnBalance().setBounds(0, 0, 89, 63);
			
			ImageIcon imageIconDeposit = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/deposit.png"));
			ImageIcon imageIconDepositClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/depositClicked.png"));
			menu.getBtnDeposit().setIcon(imageIconDeposit);
			menu.getBtnDeposit().setSelectedIcon(imageIconDepositClicked);
			menu.getBtnDeposit().setBounds(83, 0, 89, 63);
			
			ImageIcon imageIconWithdrawal = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/withdrawal.png"));
			ImageIcon imageIconWithdrawalClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/withdrawalClicked.png"));
			menu.getBtnWithdrawal().setIcon(imageIconWithdrawal);
			menu.getBtnWithdrawal().setSelectedIcon(imageIconWithdrawalClicked);
			menu.getBtnWithdrawal().setBounds(166, 0, 82, 63);
			
			ImageIcon imageIconCreateAccount = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/createAccount.png"));
			ImageIcon imageIconCreateAccountClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/createAccountClicked.png"));
			menu.getBtnCreateAccount().setIcon(imageIconCreateAccount);
			menu.getBtnCreateAccount().setSelectedIcon(imageIconCreateAccountClicked);
			menu.getBtnCreateAccount().setBounds(323, 0, 89, 63);
			
			ImageIcon imageIconLogOut = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/logout.png"));
			ImageIcon imageIconLogOutClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/logoutClicked.png"));
			menu.getBtnLogOut().setIcon(imageIconLogOut);
			menu.getBtnLogOut().setSelectedIcon(imageIconLogOutClicked);
			menu.getBtnLogOut().setBounds(661, 0, 89, 63);

			ImageIcon imageIconLeaderboard = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/leaderboard.png"));
			ImageIcon imageIconLeaderboardClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/leaderboardClicked.png"));
			menu.getBtnLeaderboard().setIcon(imageIconLeaderboard);
			menu.getBtnLeaderboard().setSelectedIcon(imageIconLeaderboardClicked);
			menu.getBtnLeaderboard().setBounds(574, 0, 89, 63);
			
			ImageIcon imageIconStatistics = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/statistics.png"));
			ImageIcon imageIconStatisticsClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/statisticsClicked.png"));
			menu.getBtnStatistics().setIcon(imageIconStatistics);
			menu.getBtnStatistics().setSelectedIcon(imageIconStatisticsClicked);
			menu.getBtnStatistics().setBounds(406, 0, 89, 63);
			
			ImageIcon imageIconTransfer = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/transfer.png"));
			ImageIcon imageIconTransferClicked = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/transferClicked.png"));
			menu.getBtnTransfer().setIcon(imageIconTransfer);
			menu.getBtnTransfer().setSelectedIcon(imageIconTransferClicked);
			menu.getBtnTransfer().setBounds(249, 0, 82, 63);
			
			imageIconSubmitGreen = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/submit.png"));
			imageIconSubmitMouseOverGreen = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/submitMouseOver.png"));
			deposit.getBtnSubmit().setIcon(imageIconSubmitGreen);
			deposit.getBtnSubmit().setRolloverIcon(imageIconSubmitMouseOverGreen);
			
			
			withdrawal.getBtnSubmit().setIcon(imageIconSubmitGreen);
			withdrawal.getBtnSubmit().setRolloverIcon(imageIconSubmitMouseOverGreen);
			withdrawal.getBtnSubmit().setSize(72, 58);
			
			deposit.getBtnSubmit().setIcon(imageIconSubmitGreen);
			deposit.getBtnSubmit().setRolloverIcon(imageIconSubmitMouseOverGreen);
			deposit.getBtnSubmit().setSize(72, 58);
			
			transfer.getBtnSubmit().setIcon(imageIconSubmitGreen);
			transfer.getBtnSubmit().setRolloverIcon(imageIconSubmitMouseOverGreen);
			transfer.getBtnSubmit().setSize( 72, 58);
		
			settings.getBtnSubmitPasswordChange().setIcon(imageIconSubmitGreen);
			settings.getBtnSubmitPasswordChange().setRolloverIcon(imageIconSubmitMouseOverGreen);
			settings.getBtnSubmitPasswordChange().setSize(72, 58);
			
			withdrawal.getBtnSubmitNewCategory().setIcon(imageIconSubmitGreen);
			withdrawal.getBtnSubmitNewCategory().setRolloverIcon(imageIconSubmitMouseOverGreen);
			withdrawal.getBtnSubmitNewCategory().setSize(72, 58);
			
			deposit.getBtnSubmitNewCategory().setIcon(imageIconSubmitGreen);
			deposit.getBtnSubmitNewCategory().setRolloverIcon(imageIconSubmitMouseOverGreen);
			deposit.getBtnSubmitNewCategory().setSize(72, 58);

			createAccount.getBtnSubmit().setIcon(imageIconSubmitGreen);
			createAccount.getBtnSubmit().setRolloverIcon(imageIconSubmitMouseOverGreen);
			createAccount.getBtnSubmit().setSize(72, 58);

			
			ImageIcon imageIconSearch = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/search.png"));
			ImageIcon imageIconSearchMouseOver = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/search.png"));
			transfer.getBtnSearch().setIcon(imageIconSearch);
			transfer.getBtnSearch().setSize(48, 39);
			transfer.getBtnSearch().setRolloverIcon(imageIconSearchMouseOver);

			imageIconRadioButton = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/radioButton.png"));
			imageIconRadioButtonSelected = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/radioButtonSelected.png"));
			
			menu.setPreferredSize(new Dimension(750, 64));
			
			
		}
	
		
		deposit.getRdbtnCoffeeMug().setIcon(imageIconRadioButton);
		deposit.getRdbtnCoffeeMug().setSelectedIcon(imageIconRadioButtonSelected);
		deposit.getRdbtnGoesGreenCoffee().setIcon(imageIconRadioButton);
		deposit.getRdbtnGoesGreenCoffee().setSelectedIcon(imageIconRadioButtonSelected);
		deposit.getRdbtnGoesGreenFixie().setIcon(imageIconRadioButton);
		deposit.getRdbtnGoesGreenFixie().setSelectedIcon(imageIconRadioButtonSelected);
		deposit.getRdbtnLargeCoffee().setIcon(imageIconRadioButton);
		deposit.getRdbtnLargeCoffee().setSelectedIcon(imageIconRadioButtonSelected);
		deposit.getRdbtnCustom().setIcon(imageIconRadioButton);
		deposit.getRdbtnCustom().setSelectedIcon(imageIconRadioButtonSelected);
		 
		withdrawal.getRdbtnAmbasssador().setIcon(imageIconRadioButton);
		withdrawal.getRdbtnAmbasssador().setSelectedIcon(imageIconRadioButtonSelected);
		withdrawal.getRdbtnBike().setIcon(imageIconRadioButton);
		withdrawal.getRdbtnBike().setSelectedIcon(imageIconRadioButtonSelected);
		withdrawal.getRdbtnProducts().setIcon(imageIconRadioButton);
		withdrawal.getRdbtnProducts().setSelectedIcon(imageIconRadioButtonSelected);
		withdrawal.getRdbtnStairway().setIcon(imageIconRadioButton);
		withdrawal.getRdbtnStairway().setSelectedIcon(imageIconRadioButtonSelected);
		withdrawal.getRdbtnCustom().setIcon(imageIconRadioButton);
		withdrawal.getRdbtnCustom().setSelectedIcon(imageIconRadioButtonSelected);
		createAccount.getRdbtnCreateAccount().setIcon(imageIconRadioButton);
		createAccount.getRdbtnCreateAccount().setSelectedIcon(imageIconRadioButtonSelected);
		createAccount.getRdbtnDeleteAccount().setIcon(imageIconRadioButton);
		createAccount.getRdbtnDeleteAccount().setSelectedIcon(imageIconRadioButtonSelected);
		
		
		
		
	}
	
	public void changeAdminSkin()
	{
		setObjects();
		
		
	
	ImageIcon imageIconAdminCreateUser = null;
	ImageIcon imageIconAdminDeleteUser = null;
	ImageIcon imageIconAdminEditUser = null;
	ImageIcon imageIconAdminStatistics = null;
	ImageIcon imageIconAdminLogOff = null;
	ImageIcon imageIconAdminLoginSubmit = null;
	ImageIcon imageIconAdminStroke = null;
	ImageIcon imageIconAdminCheckBox = null;
	ImageIcon imageIconAdminCheckBoxSelected = null;
	
	ImageIcon imageIconMainMenu = null;
	ImageIcon imageIconBack = null;
	
	if(currentSkin == 1)
	{
		
		imageIconRadioButton = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/radioButton.png"));
		imageIconRadioButtonSelected = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/radioButtonSelected.png"));
		
		
		imageIconAdminCreateUser = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/adminCreateUser.png"));
		imageIconAdminDeleteUser = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/adminDeleteUser.png"));
		imageIconAdminEditUser = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/adminEditUser.png"));
		imageIconAdminStatistics = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/adminStatistics.png"));
		imageIconAdminLogOff = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/adminLogOff.png"));
		imageIconAdminLoginSubmit = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/aminLoginSubmit.png"));
		imageIconAdminStroke = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/adminStroke.png"));
		imageIconAdminCheckBox = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/checkBox.png"));
		imageIconAdminCheckBoxSelected = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/checkBoxSelected.png"));
		adminMenu.getLblStroke().setIcon(imageIconAdminStroke);
		 
		
		UXIsEnabled = true;
		GreenIsEnabled = false;
		 
		imageIconMainMenu = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/mainMenu.png")); 
		 
		imageIconBack = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/back.png")); 
		
		adminLogin.getBtnAdminLogin().setIcon(imageIconSubmit);
		
		adminCreateUser.getBtnAddNewUser().setIcon(imageIconSubmit);
		adminDeleteUser.getBtnDeleteUser().setIcon(imageIconSubmit);
		adminStatistics.getBtnSubmitStatisticsChange().setIcon(imageIconSubmit);
		
		
		
		 //Sets the submit buttons of administrator section to UX buttons
		 
		 // Set the height, width and bounds on admin menu buttons
			
		 adminMenu.getBtnCreateUser().setBounds(52, 113, 172, 45);
			adminMenu.getBtnDeleteUser().setBounds(52, 164, 172, 45);
			adminMenu.getBtnEditUser().setBounds(52, 232, 172, 45);
			adminMenu.getBtnStatistics().setBounds(52, 286, 172, 45);
			adminMenu.getBtnLogOut().setBounds(52, 344, 172, 45);
			adminLogin.getBtnAdminLogin().setBounds(320, 221, 142, 47);
			adminLogin.getBtnBack().setBounds(599, 431, 134, 29);
			adminCreateUser.getBtnAddNewUser().setBounds(349, 326, 134,39);
			
			adminDeleteUser.getBtnDeleteUser().setSize(134, 39);
			adminStatistics.getBtnSubmitStatisticsChange().setSize(134,39);
			
			
			adminStatistics.getBtnMainMenu().setBounds(616, 440, 134, 39);
			adminDeleteUser.getBtnMainMenu().setBounds(616, 440, 134, 39);
			adminEditUser.getBtnMainMenu().setBounds(616, 440, 134, 39);
			adminCreateUser.getBtnMainMenu().setBounds(616, 440, 134, 39);
			
			adminCreateUser.getBtnAddNewUser().setBounds(349, 326, 134,39);
			adminDeleteUser.getBtnDeleteUser().setBounds(343, 203, 134, 39);
			adminStatistics.getBtnSubmitStatisticsChange().setBounds(598, 112, 134, 39);
			
	}
	
	else if(currentSkin == 2)
	{
		
		imageIconRadioButton = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/radioButton.png"));
		imageIconRadioButtonSelected = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/radioButtonSelected.png"));
		
	
		
		imageIconAdminCreateUser = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/adminCreateUser.png"));
		imageIconAdminDeleteUser = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/adminDeleteUser.png"));
		imageIconAdminEditUser = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/adminEditUser.png"));
		imageIconAdminStatistics = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/adminStatistics.png"));
		imageIconAdminLogOff = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/adminLogOff.png"));
		imageIconAdminLoginSubmit = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/adminLoginSubmit.png"));
		imageIconAdminCheckBox = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/checkBox.png"));
		imageIconAdminCheckBoxSelected = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/checkBoxSelected.png"));
		
		UXIsEnabled = false;	
		
		GreenIsEnabled = true;
		
		imageIconMainMenu = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/mainMenu.png")); 
		
		imageIconBack = imageIconMainMenu;
		
		// Sets all the administrator sections submit buttons to Green buttons
		adminLogin.getBtnAdminLogin().setIcon(imageIconSubmitGreen);
		adminLogin.getBtnAdminLogin().setRolloverIcon(imageIconSubmitMouseOverGreen);
	
		
		
		adminCreateUser.getBtnAddNewUser().setIcon(imageIconSubmitGreen);
		adminCreateUser.getBtnAddNewUser().setRolloverIcon(imageIconSubmitMouseOverGreen);
		
		adminDeleteUser.getBtnDeleteUser().setIcon(imageIconSubmitGreen);
		adminDeleteUser.getBtnDeleteUser().setRolloverIcon(imageIconSubmitMouseOverGreen);
		
		adminStatistics.getBtnSubmitStatisticsChange().setIcon(imageIconSubmitGreen);
		adminStatistics.getBtnSubmitStatisticsChange().setRolloverIcon(imageIconSubmitMouseOverGreen);
		
		 // Set the height, width and bounds on admin menu buttons
		
		 adminMenu.getBtnCreateUser().setBounds(82, 195,  61, 61);
			adminMenu.getBtnDeleteUser().setBounds(208, 195, 61, 61);
			adminMenu.getBtnEditUser().setBounds(334, 195,  61, 61);
			adminMenu.getBtnStatistics().setBounds(472, 195,  61, 61);
			adminMenu.getBtnLogOut().setBounds(614, 195,  61, 61);
			
			adminLogin.getBtnAdminLogin().setBounds(415, 220, 50, 61);
			adminLogin.getBtnBack().setBounds(640, 399, 80, 61);
			
			adminCreateUser.getBtnAddNewUser().setBounds(459, 291, 50, 61);
			adminDeleteUser.getBtnDeleteUser().setBounds(556, 171, 50, 61);
			
			adminStatistics.getBtnSubmitStatisticsChange().setBounds(677, 118, 50, 61);
			
			adminCreateUser.getBtnMainMenu().setBounds(640, 399, 80, 61);
			adminDeleteUser.getBtnMainMenu().setBounds(640, 399, 80, 61);
			adminEditUser.getBtnMainMenu().setBounds(640, 399, 80, 61);
			adminStatistics.getBtnMainMenu().setBounds(640, 399, 80, 61);
			
			
	
			
	}
	
	//sets checkboxes
	adminCreateUser.getChckbxAdmin().setIcon(imageIconAdminCheckBox);
	adminCreateUser.getChckbxAdmin().setSelectedIcon(imageIconAdminCheckBoxSelected);
	
	// Sets all radiobuttons to the initialized state of imageIconRadioButton
	adminStatistics.getRdbtnAllAccountBalances().setIcon(imageIconRadioButton);
	adminStatistics.getRdbtnAllAccountBalances().setSelectedIcon(imageIconRadioButtonSelected);
	
	adminStatistics.getRdbtnSpecificUsersAccount().setIcon(imageIconRadioButton);
	adminStatistics.getRdbtnSpecificUsersAccount().setSelectedIcon(imageIconRadioButtonSelected);
	
	adminStatistics.getRdbtnUsersPasswordLength().setIcon(imageIconRadioButton);
	adminStatistics.getRdbtnUsersPasswordLength().setSelectedIcon(imageIconRadioButtonSelected);
	
	adminStatistics.getRdbtnYourOwnTransactions().setIcon(imageIconRadioButton);
	adminStatistics.getRdbtnYourOwnTransactions().setSelectedIcon(imageIconRadioButtonSelected);
	
	//sets the label stroke in adminmenu as visible, if classic skin is enabled
	adminMenu.getLblStroke().setVisible(UXIsEnabled);
	adminMenu.getLblStroke2().setVisible(UXIsEnabled);
	adminMenu.getLblStroke3().setVisible(UXIsEnabled);
	adminMenu.getLblStroke4().setVisible(UXIsEnabled);
	adminMenu.getLblStroke5().setVisible(UXIsEnabled);
	
	adminCreateUser.getBtnAddNewUser().setRolloverEnabled(GreenIsEnabled);
	adminDeleteUser.getBtnDeleteUser().setRolloverEnabled(GreenIsEnabled);
	adminStatistics.getBtnSubmitStatisticsChange().setRolloverEnabled(GreenIsEnabled);
	adminLogin.getBtnAdminLogin().setRolloverEnabled(GreenIsEnabled);
	
	
	adminMenu.getLblCreateANew().setVisible(UXIsEnabled);
	adminMenu.getLblDeleteAnExisting().setVisible(UXIsEnabled);
	adminMenu.getLblEditAnExisting().setVisible(UXIsEnabled);
	adminMenu.getLblLogOut().setVisible(UXIsEnabled);
	adminMenu.getLblStroke().setVisible(UXIsEnabled);
	adminMenu.getLblViewAList().setVisible(UXIsEnabled);
	adminMenu.getLblStroke().setVisible(UXIsEnabled);
			
	adminMenu.getBtnCreateUser().setIcon(imageIconAdminCreateUser);
	adminMenu.getBtnDeleteUser().setIcon(imageIconAdminDeleteUser);
	adminMenu.getBtnEditUser().setIcon(imageIconAdminEditUser);
	adminMenu.getBtnStatistics().setIcon(imageIconAdminStatistics);
	adminMenu.getBtnLogOut().setIcon(imageIconAdminLogOff);
	
	adminCreateUser.getBtnMainMenu().setIcon(imageIconMainMenu);
	adminDeleteUser.getBtnMainMenu().setIcon(imageIconMainMenu);
	adminEditUser.getBtnMainMenu().setIcon(imageIconMainMenu);
	adminStatistics.getBtnMainMenu().setIcon(imageIconMainMenu);
	
	adminLogin.getBtnBack().setIcon(imageIconBack);
	
	
	
	}

	public void changeLoginSkin()
	{
		
		
		System.out.println(currentSkin);
		
		
		ImageIcon imageIconAdminLoginSubmit = null;

		if(currentSkin == 1) // Classic skin is enabled
		{
			imageIconAdminLoginSubmit = new ImageIcon(SkinChanger.class.getResource("/Pictures/ux/aminloginSubmit.png"));
			
			UXIsEnabled= true;
			GreenIsEnabled = false;

			frame.getLogin().getBtnLogin().setIcon(imageIconSubmit);
			frame.getLogin().getBtnLogin().setBounds(320, 221, 142, 47);
			frame.getLogin().getBtnAdminLogin().setBounds(17, 420, 110, 39);
		}
		
		else if(currentSkin == 2) // green skin is enabled
		{
			imageIconAdminLoginSubmit = new ImageIcon(SkinChanger.class.getResource("/Pictures/green/adminloginSubmit.png"));
			
			UXIsEnabled= false;
			GreenIsEnabled = true;
			
			System.out.println(imageIconSubmitGreen);
			frame.getLogin().getBtnLogin().setIcon(imageIconSubmitGreen);
			frame.getLogin().getBtnLogin().setRolloverIcon(imageIconSubmitMouseOverGreen);
			frame.getLogin().getBtnLogin().setBounds(365, 220, 50, 61);
			frame.getLogin().getBtnAdminLogin().setBounds(6, 401, 61, 61);
			
		}
		System.out.println(imageIconAdminLoginSubmit);
		System.out.println(GreenIsEnabled);
		System.out.println(frame.getLogin().getBtnAdminLogin().getBounds());
		System.out.println(frame.getLogin().getBtnLogin().getSize());
		
		frame.getLogin().getBtnAdminLogin().setIcon(imageIconAdminLoginSubmit);
		frame.getLogin().getBtnAdminLogin().setRolloverEnabled(GreenIsEnabled);
		frame.getLogin().getBtnLogin().setRolloverEnabled(GreenIsEnabled);
		
		
	}
	/**
	 * @return the currentSkin
	 */
	public int getCurrentSkin() {
		return currentSkin;
	}




	/**
	 * @param currentSkin the currentSkin to set
	 */
	public void setCurrentSkin(int currentSkin) {
		this.currentSkin = currentSkin;
	}
}
